<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>

<body>
<script type="text/javascript" src="/js/plugins/jquery/jquery.min.js"></script>
<script type="text/javascript" src="/js/plugins/jquery.easing/jquery.easing.min.js"></script>
<script type="text/javascript" src="/js/plugins/sui/sui.min.js"></script>
<script type="text/javascript" src="/components/ui-modules/nav/nav-portal-top.js"></script>
<script type="text/javascript" src="/js/pages/getOrderInfo.js"></script>
<script>

    $(function (){
        var time=10;
        var dingshi=setInterval(function (){
            if(time==0){
                clearInterval(dingshi)
                getOrder();
            }
            $("#msg").html("正在支付请稍候..."+ time-- +"s")
        },1000)

    })

    function getOrder(){
        $.ajax({
            url:"/seckillGood/getorderid",
            data:{},
            dataType:"json",
            type:"get",
            async:false,//同步请求
            success:function (result){
                // console.log()
                if(result.code==10000) {
                    var datas=result.data;//订单id
                    // console.log(datas)
                    alert("跳转支付"+datas)
                }else if(result.code==20004){//没登录
                    alert("未登录")
                    location.href="/user/deng"
                }else{
                    alert(result.message)//没货了
                }
            }
        })
    }




</script>
<h1 id="msg"> 正在跳转支付请稍候...10s</h1>
</body>
</html>